import 'dart:io';

import 'package:card_topia/design_specifications.dart';
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';


///自定义脚手架
extension MyScaffold on Scaffold{
  Widget withOnTap(BuildContext context){
    return Material(
      child: SizedBox(
        height: double.infinity,
        width: double.infinity,
        child: InkWell(
          child: this,
          onTap: (){
            FocusScope.of(context).requestFocus(FocusNode());
          },
        ),
      ),
    );
  }
}

// class CustomScaffold extends StatelessWidget {
//   const CustomScaffold({
//     super.key,
//     this.appBar,
//     this.body,
//     this.floatingActionButton,
//     this.floatingActionButtonLocation,
//     this.floatingActionButtonAnimator,
//     this.persistentFooterButtons,
//     this.persistentFooterAlignment = AlignmentDirectional.centerEnd,
//     this.drawer,
//     this.onDrawerChanged,
//     this.endDrawer,
//     this.onEndDrawerChanged,
//     this.bottomNavigationBar,
//     this.bottomSheet,
//     this.backgroundColor,
//     this.resizeToAvoidBottomInset,
//     this.primary = true,
//     this.drawerDragStartBehavior = DragStartBehavior.start,
//     this.extendBody = false,
//     this.extendBodyBehindAppBar = false,
//     this.drawerScrimColor,
//     this.drawerEdgeDragWidth,
//     this.drawerEnableOpenDragGesture = true,
//     this.endDrawerEnableOpenDragGesture = true,
//     this.restorationId,
//   });
//   final bool extendBody;
//   final bool extendBodyBehindAppBar;
//   final PreferredSizeWidget? appBar;
//   final Widget? body;
//   final Widget? floatingActionButton;
//   final FloatingActionButtonLocation? floatingActionButtonLocation;
//   final FloatingActionButtonAnimator? floatingActionButtonAnimator;
//   final List<Widget>? persistentFooterButtons;
//   final AlignmentDirectional persistentFooterAlignment;
//   final Widget? drawer;
//   final DrawerCallback? onDrawerChanged;
//   final Widget? endDrawer;
//   final DrawerCallback? onEndDrawerChanged;
//   final Color? drawerScrimColor;
//   final Color? backgroundColor;
//   final Widget? bottomNavigationBar;
//   final Widget? bottomSheet;
//   final bool? resizeToAvoidBottomInset;
//   final bool primary;
//   final DragStartBehavior drawerDragStartBehavior;
//   final double? drawerEdgeDragWidth;
//   final bool drawerEnableOpenDragGesture;
//   final bool endDrawerEnableOpenDragGesture;
//   final String? restorationId;
//   @override
//   Widget build(BuildContext context) {
//     return AnnotatedRegion(child: Scaffold(
//         extendBody:extendBody,
//       extendBodyBehindAppBar:extendBodyBehindAppBar,
//       appBar:appBar,
//       body:body,
//       floatingActionButton:floatingActionButton,
//       floatingActionButtonLocation:floatingActionButtonLocation,
//       floatingActionButtonAnimator:floatingActionButtonAnimator,
//       persistentFooterButtons:persistentFooterButtons,
//         extendBody:extendBody,
//         extendBody:extendBody,
//         extendBody:extendBody,
//     ), value: SystemUiOverlayStyle(
//       systemNavigationBarColor: scaffoldBackgroundColor,
//       statusBarColor: Colors.transparent
//     ));
//   }
// }
